package com.ly.heart.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ly.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ly.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 人员证书记录对象 erp_user_certificate_info
 * @author wutao
 * @date 2024-05-31
 */
@TableName ("erp_user_certificate_info")
@ApiModel (value = "erp_user_certificate_info对象", description = "人员证书记录")
@Data
public class UserCertificateEntity extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId (value = "id", type = IdType.INPUT)
    private String id;

    /**
     * 公司Id,关联部门表level为1
     */
    @ApiModelProperty ("公司Id,关联部门表level为1")
    @TableField ("dept_id")
    @Excel (name = "公司Id,关联部门表level为1")
    private String deptId;

    /**
     * 证书名称
     */
    @ApiModelProperty ("证书名称")
    @TableField ("certificate_name")
    @Excel (name = "证书名称")
    private String certificateName;

    /**
     * 证书编号
     */
    @ApiModelProperty ("证书编号")
    @TableField ("certificate_number")
    @Excel (name = "证书编号")
    private String certificateNumber;

    /**
     * 证书所属人员Id
     */
    @ApiModelProperty ("证书所属人员Id")
    @TableField ("user_id")
    @Excel (name = "证书所属人员Id")
    private String userId;

    /**
     * 发证日期
     */
    @ApiModelProperty ("发证日期")
    @TableField ("certificate_time")
    @JsonFormat (pattern = "yyyy-MM-dd")
    @Excel (name = "发证日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date certificateTime;

    /**
     * 到期日期
     */
    @ApiModelProperty ("到期日期")
    @TableField ("expire_time")
    @JsonFormat (pattern = "yyyy-MM-dd")
    @Excel (name = "到期日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expireTime;

    /**
     * 收管日期
     */
    @ApiModelProperty ("收管日期")
    @TableField ("receive_time")
    @JsonFormat (pattern = "yyyy-MM-dd")
    @Excel (name = "收管日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date receiveTime;

    /**
     * 协议日期
     */
    @ApiModelProperty ("协议日期")
    @TableField ("protocol_time")
    @JsonFormat (pattern = "yyyy-MM-dd")
    @Excel (name = "协议日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date protocolTime;

    /**
     * 是否注册在公司;1:是;2:否
     */
    @ApiModelProperty ("是否注册在公司;1:是;2:否")
    @TableField ("is_register_company")
    @Excel (name = "是否注册在公司;1:是;2:否")
    private Integer isRegisterCompany;

    /**
     * 金额
     */
    @ApiModelProperty ("金额")
    @TableField ("money")
    @Excel (name = "金额")
    private String money;

    /**
     * 管理部门,关联部门表level为2
     */
    @ApiModelProperty ("管理部门,关联部门表level为2")
    @TableField ("mgr_dept_id")
    @Excel (name = "管理部门,关联部门表level为2")
    private String mgrDeptId;

    /**
     * 备注
     */
    @ApiModelProperty ("备注")
    @TableField ("remarks")
    @Excel (name = "备注")
    private String remarks;

    /**
     * 是否在用
     */
    @ApiModelProperty ("是否在用")
    @TableField ("is_used")
    @Excel (name = "是否在用")
    private Integer isUsed;

    @Override
    public String toString () {
        return new ToStringBuilder ( this, ToStringStyle.MULTI_LINE_STYLE )
                .append ( "id", getId () )
                .append ( "deptId", getDeptId () )
                .append ( "certificateName", getCertificateName () )
                .append ( "certificateNumber", getCertificateNumber () )
                .append ( "userId", getUserId () )
                .append ( "certificateTime", getCertificateTime () )
                .append ( "expireTime", getExpireTime () )
                .append ( "receiveTime", getReceiveTime () )
                .append ( "protocolTime", getProtocolTime () )
                .append ( "isRegisterCompany", getIsRegisterCompany () )
                .append ( "money", getMoney () )
                .append ( "mgrDeptId", getMgrDeptId () )
                .append ( "remarks", getRemarks () )
                .append ( "createBy", getCreateBy () )
                .append ( "createTime", getCreateTime () )
                .append ( "updateTime", getUpdateTime () )
                .append ( "isUsed", getIsUsed () )
                .toString ();
    }
}
